<template>
	<view>
		<view class="left-image-container">
			<!-- 左边图片区域 -->
			<view class="left-img-box">
				<view class="left-box">
					<image
						:src="item.img"
						class="image-box"></image>
				</view>
			</view>
			<view class="right-box">
				<text> {{item.text}}</text>
				<rich-text :nodes="nodes" class="rich-text">{{item.price}}</rich-text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"goods-item",
		props:{
			item:{
				type:Object
			}
		},
		data() {
			return {
				// item:{
				// 	img:"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F0197935711ee3c6ac7251343b3addc.jpg&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1628262367&t=3cc1e6b3076ecebed510469129a6b793",
				// 	text:'【包邮大礼物】小米（mi）电视电视4A 9英寸的标准版智能彩色电视TV',
				// 	price:"$2299.00"
				// }
			};
		},
		mounted(){
			console.log(this.item)
		}
	}
</script>

<style lang="scss" scoped>
	.left-image-container {
		display: flex;
		
		.left-img-box {
			width: 350rpx;

			.left-box {
				display: flex;
				justify-content: center;
				align-items: center;
				margin: 10px;

				.image-box {
					width: 250rpx;
					height: 200rpx;
				}
			}
		}

		.right-box {
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			margin: 25rpx;

			text {
				font-size: 26rpx;
			}

			.rich-text {
				font-weight: bold;
				font-size: 30rpx;
				color: #FA3534;
			}

		}

	}
</style>
